<?php
// src/model/post.php

// REQUIRE:
if(version_compare(PHP_VERSION, '5.3.0', '>=')) { require_once __DIR__.'/../include.inc'; } 
else { require_once dirname(__FILE__).'/../include.inc'; }


class Post
{
	public $subject;
	public $author;
	public $date;
	public $message;
	
	public function __construct($subject, $author, $date, $message)
	{
		$this->
		set_subject($subject)->
		set_author($author)->
		set_date($date)->
		set_message($message);
		// ok!
	}
	
	public function set_subject($subject)
	{
		$this->subject = $subject;
		return $this;
	}
	
	public function set_author($author)
	{
		$this->author = $author;
		return $this;
	}
	
	public function set_date($date)
	{
		$this->date = $date;
		return $this;
	}
	
	public function set_message($message)
	{
		$this->message = $message;
		return $this;
	}
}
?>